package com.snowfield.lb47.lbconfig.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 黑白名单详情对象 config_blackwhitelist_detail
 *
 * @author snowfield
 * @date 2024-05-24
 */
public class BlackwhiteListDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 标识ID
     */
    private Long id;

    /**
     * 类型（ip,subnet）
     */
    @Excel(name = "类型", readConverterExp = "ip,subnet")
    private String ipType;

    /**
     * IP地址
     */
    @Excel(name = "IP地址")
    private String ipaddr;

    /**
     * 掩码(24-32)
     */
    @Excel(name = "掩码(24-32)")
    private Long mask;

    /**
     * 状态（1正常 0停用）
     */
    @Excel(name = "状态", readConverterExp = "1=正常,0=停用")
    private String status;

    /**
     * 黑白名单标识ID
     */
    @Excel(name = "黑白名单标识ID")
    private Long listId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setIpType(String ipType) {
        this.ipType = ipType;
    }

    public String getIpType() {
        return ipType;
    }

    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
    }

    public String getIpaddr() {
        return ipaddr;
    }

    public void setMask(Long mask) {
        this.mask = mask;
    }

    public Long getMask() {
        return mask;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public void setListId(Long listId) {
        this.listId = listId;
    }

    public Long getListId() {
        return listId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("ipType", getIpType())
                .append("ipaddr", getIpaddr())
                .append("mask", getMask())
                .append("status", getStatus())
                .append("listId", getListId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
